import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    loginuser: JSON.parse(sessionStorage.getItem("loginuser"))
  },
  mutations: {
    setLoginUser(state, loginuser) {
      state.loginuser = loginuser;
    }
  },
  actions: {},
  getters: {
    getLoginUser(state) {
      return state.loginuser;
    }
  }
});
